package org.groovyflow.file;

import java.io.File;
import java.util.Map;

public class DifferenceFinder implements FileHandler{
	private Map mapFile;
	private boolean changed;
	public void handle(File f) {
		if(this.changed) return;
		Long alreadyThere = (Long) mapFile.get(f.getAbsolutePath());
		if(alreadyThere == null || !( new Long(f.lastModified()).equals(alreadyThere))){
			this.changed = true;
		}
	}
	public boolean isChanged() {
		return changed;
	}
	public void setMapFile(Map mapFile) {
		this.mapFile = mapFile;
	}
}
